<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<!-- 引入easyUI的样式 -->
<link rel="stylesheet" type="text/css" href="themes/bootstrap/easyui.css">
<link rel="stylesheet" type="text/css" href="themes/icon.css">
<!-- js文件 -->
<script type="text/javascript" src="js/jquery.min.js"></script>
<script type="text/javascript" src="js/jquery.easyui.min.js"></script>
<script type="text/javascript" src="js/easyui-lang-zh_CN.js"></script>
<title>物流配送系统</title>
</head>
<script type="text/javascript">
<!--加载对应功能 -->
	$(function(){
		var uid = ${sessionScope.currentUser.uid}
		$('#methodTree').tree({    
		    url:'${pageContext.request.contextPath}/user/user_showFunc.action',
		    queryParams:{"uid":uid},
			onLoadSuccess:function(node,data){
			$('#methodTree').tree('expandAll');
			},
			onClick:function(node){
				if(node.attributes.url){
					if($("#mtabs").tabs('exists',node.text)){
						$("#mtabs").tabs('select',node.text)
					}else{
						//选择要链接的路径页面
						var pageContent="<iframe frameborder=0 scrolling='auto' style='width:100%;height:100%' src="+node.attributes.url+"></iframe>";
						$("#mtabs").tabs('add',{
						title:node.text,
						closable:true,
						fit:true,
						content:pageContent
					})
				}
			}
				
		}
		});  
	});
</script>
<body class="easyui-layout" style="margin: 10px 10px 10px 10px">
 	<div data-options="region:'north',title:'物流配送系统',width:50,height:120,split:true,collapsible:false">
 		<h5>${sessionScope.currentUser.uname},欢迎你</h5><a href="login.jsp" class="easyui-linkbutton" onclick="cancel()">退出</a>
 	</div>
 	<div data-options="region:'west',title:'功能展示',width:200,height:50,split:true">
 	<ul id="methodTree"></ul>
 	</div>
 	<div data-options="region:'center',width:50,height:50,split:true">
 			<div id="mtabs" class="easyui-tabs" style="width:100%;height:100%;">   
    			<div title="首页" data-options="fit:true">   
        				欢迎使用本系统
    			</div>  
			</div>  
 	</div>
 	<div data-options="region:'south',title:'版权所有',width:50,height:100,split:true,collapsible:false"></div>
</body>
</html>